<!--
 * @Author: q576936536 Lusir95@163.com
 * @Date: 2022-07-17 09:39:31
 * @LastEditors: q576936536 Lusir95@163.com
 * @LastEditTime: 2022-07-17 09:57:02
 * @FilePath: \vue3-test\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEa
-->
<template>
  <el-tabs class="demo-tabs" v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="User" name="first">
      <input type="text" v-model="testProps" />
      <button @click="getNewText('1111')"></button>
      <LusirPage :msg="testProps" @getNewText="getNewText" />
    </el-tab-pane>
    <el-tab-pane label="随机选中" name="second">
      <EchartsModule />
    </el-tab-pane>
    <!-- <el-tab-pane label="地图展示" name="third">
     <el-scrollbar>
     <MapEcharts />
    </el-scrollbar>
      </el-tab-pane> -->
    <!-- <el-tab-pane label="模拟场景" name="fourth">
      <LoginPage />
      </el-tab-pane> -->
  </el-tabs>
</template>

<script>
import LusirPage from "./components/Lusir.vue";

import {
  ref,
  // reactive,
  // toRefs
} from "vue";
export default {
  name: "App",
  components: {
    LusirPage,
  },
  data() {
    return {
      activeName: "first",
      timeLineHeight: "",
    };
  },
  setup() {
    const testProps = ref("测试父组件的值");

    const getNewText = (data) => {
      testProps.value = data;
      console.log(testProps);
    };
    return {
      testProps,
      getNewText,
    };
  },
  mounted() {
    this.timeLineHeight = document.documentElement.clientHeight - 210;
    window.onresize = () => {
      this.timeLineHeight = document.documentElement.clientHeight - 210;
    };

    // let element = document.getElementsByClassName("buttom_span");
    // // element.style.cssText = 'color: red';
    // //  element[i].style.color = ' red';
    // for(var i = 0;i<element.length;i++){
    //   element[i].style.cssText = 'color: red';
    //     }
    //   console.log(element,"全局的样式可以获取到吗？");
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* text-align: center; */
  color: #2c3e50;
  /* margin-top: 60px; */
}

.el-tabs__content {
  /* overflow-y: auto !important;
  height: 1000px; */
}
</style>
